<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>活动</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="/favicon.ico">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="../public/css/iconfont.css">
    <link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
    <link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css">
    <link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/??sm.min.css,sm-extend.min.css">

</head>

<body>
    <div class="page">
        <header class="bar bar-nav">
            <a class="button button-link button-nav pull-left" href="/demos/card" data-transition='slide-out'>
                <span class="icon icon-left"></span>
                返回
            </a>
            <h1 class="title">活动</h1>
        </header>
        <nav class="bar bar-tab">
            <a class="tab-item" href="#">
                <span class="icon icon-home"></span>
                <span class="tab-label">首页</span>
            </a>
            <a class="tab-item active" href="#">
                <span class="icon icon-me"></span>
                <span class="tab-label">活动</span>
            </a>
            <a class="tab-item" href="#">
                <span class="icon icon-star"></span>
                <span class="tab-label">消息</span>
            </a>
            <a class="tab-item" href="#">
                <span class="icon icon-settings"></span>
                <span class="tab-label">我的</span>
            </a>
        </nav>
        <div class="content pull-to-refresh-content">
            <!-- 默认的下拉刷新层 -->
            <div class="pull-to-refresh-layer">
                <div class="preloader"></div>
                <div class="pull-to-refresh-arrow"></div>
            </div>
            <!-- 这里是页面内容区 -->
            <div class="page-index">
                <div class="card facebook-card">
                    <div class="card-header no-border">
                        <div class="facebook-avatar"><img
                                src="http://gqianniu.alicdn.com/bao/uploaded/i4//tfscom/i3/TB10LfcHFXXXXXKXpXXXXXXXXXX_!!0-item_pic.jpg_250x250q60.jpg"
                                width="34" height="34"></div>
                        <div class="facebook-name">夜萧</div>
                        <div class="facebook-date">星期一 3:47pm</div>
                    </div>
                    <div class="card-content"><img
                            src="http://gqianniu.alicdn.com/bao/uploaded/i4//tfscom/i3/TB10LfcHFXXXXXKXpXXXXXXXXXX_!!0-item_pic.jpg_250x250q60.jpg"
                            width="100%"></div>
                    <div class="card-footer no-border">
                        <a href="#" class="link">
                            <span class="iconfont icon-like-1"></span>
                        </a>
                        <a href="#" class="link">
                            <span class="iconfont icon-liuyan"></span>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm-extend.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/??sm.min.js,sm-extend.min.js'
        charset='utf-8'></script>
    <script>
        // 下拉刷新js
        // 添加'refresh'监听器
        $(document).on('refresh', '.pull-to-refresh-content', function (e) {
            // 模拟2s的加载过程
            setTimeout(function () {
                var cardNumber = $(e.target).find('.card').length + 1;
                var cardHTML = '<div class="card">' +
                    '<div class="card-header">card' + cardNumber + '</div>' +
                    '<div class="card-content">' +
                    '<div class="card-content-inner">' +
                    '这里是第' + cardNumber + '个card，下拉刷新会出现第' + (cardNumber + 1) + '个card。' +
                    '</div>' +
                    '</div>' +
                    '</div>';

                $(e.target).find('.card-container').prepend(cardHTML);
                // 加载完毕需要重置
                $.pullToRefreshDone('.pull-to-refresh-content');
            }, 2000);
        });
    </script>
</body>

</html>